<link rel="stylesheet" href="{{ url_for('static', filename='css/pages/card_item.css') }}">
{% extends 'base.html' %}
{% block content %}
<div class="container">
    <a class="btn btn-primary" href="/">Назад</a>
    <div class="card item-block">
        <div class="card-body">
            <p><strong>Путь:</strong> {{ method.path }}</p>
            <p><strong>Метод:</strong> {{ method.method }}</p>
            <p><strong>Описание:</strong> {{ method.description }}</p>
            <p><strong>Запрос:</strong></p>
            <ul>
                {% for field in method.request.fields %}
                <li>{{ field.name }} ({{ field.type }}) - {{ "Required" if field.required else "Optional" }}: {{
                    field.description }}
                </li>
                {% endfor %}
            </ul>
            <p><strong>Ответ:</strong></p>
            <ul>
                {% for field in method.response.fields %}
                <li>{{ field.name }} ({{ field.type }}): {{ field.description }}</li>
                {% endfor %}
            </ul>
            <p><strong>Статусы:</strong></p>
            <ul>
                {% for status in method.statuses %}
                <li>{{ status.code }}: {{ status.description }}</li>
                {% endfor %}
            </ul>
            <p><strong>Пример запроса:</strong></p>
            <pre><code>{{ method.example_request }}</code></pre>
            <p><strong>Пример ответа:</strong></p>
            <pre><code>{{ method.example_response }}</code></pre>
        </div>
    </div>
</div>
{% endblock %}